//**********************************************************
//    File Name: Schedule.cs
//    Author: Team Motif
//    Date Created : 04/13/2007
//    Current Owner: Team Motif 
//                                                                            
//    Purpose: 
//    This class provides access to the client and homecare worker schedules. A schedule
//    is a collection of appointments.
//
//	  Copyright 2007
//**********************************************************

using System;
using System.Collections;
using System.Text;

namespace Library
{
    public class Schedule
    {
        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Constructor for the Schedule class
        /// -------------------------------------------------------------------------------
        /// </summary>
        public Schedule()
        {
            mAvailableTimeSlots = new ArrayList();
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Returns all the available time slots for this schedule
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns></returns>
        public ArrayList GetAllAvailableTimeSlots()
        {
            return mAvailableTimeSlots;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Returns all available time slots for this Schedule given a date range
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public ArrayList GetAvailableTimeSlotsByRange(DateTime start, DateTime end)
        {
            ArrayList newList = new ArrayList();

            // figure out what the times are and add it to newList
            return newList;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Add a new available time slot
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="slot"></param>
        public void AddAvailableTimeSlot(AvailableTimeSlot slot)
        {
            mAvailableTimeSlots.Add(slot);
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Remove an existing time slot
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="slot"></param>
        public void RemoveAvailableTimeSlot(AvailableTimeSlot slot)
        {
            mAvailableTimeSlots.Remove(slot);
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Get unscheduled time slots for this Schedule
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns></returns>
        public ArrayList GetUnscheduledTimeSlots()
        {
            ArrayList newList = new ArrayList();

            // figure out what the times are and add it to newList
            return newList;
        }

        // -------------------------------------------------------------------------------
        // Private date region.
        // -------------------------------------------------------------------------------
        ArrayList mAvailableTimeSlots;
    }
}
